home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / misc / gs261src.zip / gs_statd.ps < prev    next >
Text File  |  1993-05-13  |  7KB  |  183 lines

  1. %    Copyright (C) 1989-1993 Aladdin Enterprises.  All rights reserved.
  2. %
  3. % This file is part of Ghostscript.
  4. %
  5. % Ghostscript is distributed in the hope that it will be useful, but
  6. % WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  7. % to anyone for the consequences of using it or for whether it serves any
  8. % particular purpose or works at all, unless he says so in writing.  Refer
  9. % to the Ghostscript General Public License for full details.
  10. %
  11. % Everyone is granted permission to copy, modify and redistribute
  12. % Ghostscript, but only under the conditions described in the Ghostscript
  13. % General Public License.  A copy of this license is supposed to have been
  14. % given to you along with Ghostscript so you can know your rights and
  15. % responsibilities.  It should be in a file named COPYING.  Among other
  16. % things, the copyright notice and this notice must be preserved on all
  17. % copies.
  18.  
  19. % This file provides statusdict, serverdict, and assorted LaserWriter
  20. % operators, mostly for the benefit of poorly designed PostScript programs
  21. % that 'know' they are running on a LaserWriter.
  22.  
  23. systemdict begin
  24.  
  25.  /statusdict 80 dict def
  26.  /serverdict 4 dict def
  27.  
  28. % Define various paper formats.
  29. % Only letter, note, and legal are defined in the Adobe manual.
  30. % These procedures are also accessed as data structures during initialization,
  31. % so the page dimensions must be the first two elements of the procedure.
  32.  
  33.  /letter {612 792 //statusdict begin .setpagesize end} bind def
  34.  /note {540 720 //statusdict begin .setpagesize end} bind def
  35.  /legal {612 1008 //statusdict begin .setpagesize end} bind def
  36.  /a3 {842 1190 //statusdict begin .setpagesize end} bind def
  37.  /a4 {595 842 //statusdict begin .setpagesize end} bind def
  38.  /a5 {421 595 //statusdict begin .setpagesize end} bind def
  39.  /a6 {297 421 //statusdict begin .setpagesize end} bind def
  40.  /b4 {709 1002 //statusdict begin .setpagesize end} bind def
  41.  /flsa {612 936 //statusdict begin .setpagesize end} bind def  % U.S. foolscap
  42.  /flse {612 936 //statusdict begin .setpagesize end} bind def  % European foolscap
  43.  /halfletter {396 612 //statusdict begin .setpagesize end} bind def
  44.  /11x17 {792 1224 //statusdict begin .setpagesize end} bind def  % 11x17 portrait
  45.  /ledger {1224 792 //statusdict begin .setpagesize end} bind def  % 11x17 landscape
  46.  
  47. end
  48.  
  49. statusdict begin
  50.  
  51. % Define the pagetype values for the known page formats.
  52. % The values for all but letter and note are arbitrary.
  53. /.pagetypenames
  54.  { /letter /note /legal /a3 /a4 /a5 /a6 /b4
  55.    /flsa /flse /halfletter /11x17 /ledger
  56.  } cvlit readonly def
  57.  
  58. %%%%%% The following items were suggested by a user as useful.
  59.  
  60. % Permanent definitions
  61.  
  62. /ramsize         4194304 def
  63. /hardwareiomode        0 def
  64.     /sethardwareiomode     {pop} bind def
  65. /softwareiomode        0 def
  66.     /setsoftwareiomode     {pop} bind def
  67. /dosysstart        false def
  68.     /setdosysstart         {pop} bind def
  69. /allowjobreset      true def
  70.     /setallowjobreset      {pop} bind def
  71. /defaultpaperfamily    0 def
  72.     /setdefaultpaperfamily {pop} bind def
  73. /defaultpapertray      0 def
  74.     /setdefaultpapertray   {pop} bind def
  75. /defaulttrayswitch false def
  76.     /setdefaulttrayswitch  {pop} bind def
  77.  
  78. % Tray and format selection
  79.  
  80.  /11x17tray {} bind def
  81.  /a3tray {} bind def
  82.  /a4tray {} bind def
  83.  /a5tray {} bind def
  84.  /a6tray {} bind def
  85.  /b4tray {} bind def
  86.  /flsatray {} bind def
  87.  /flsetray {} bind def
  88.  /halflettertray {} bind def
  89.  /legaltray {} bind def
  90.  /lettertray {} bind def
  91.  
  92. % Per-job parameters
  93.  
  94. /paperfamily 0 def    % 0 is US, 1 is European
  95. /papertray 1 def
  96.     /setpapertray {statusdict exch /papertray exch put} bind def 
  97. /trayswitch false def    % paperout feeds from another tray
  98. /papersize {/letter true} bind def    % <name of paper size>, <short-edge-first-p>
  99. /appletalktype (LaserWriter) def
  100.  
  101. %%%%%% The following items are defined in the PostScript Language
  102. %%%%%% Reference Manual, First Edition.
  103.  
  104.  /checkpassword {statusdict begin .password eq end} bind def
  105.  /defaulttimeouts {statusdict begin .timeouts aload pop end} bind def
  106. %/dostartpage
  107.  /eescratch {pop 0} bind def
  108.  /idlefonts {statusdict begin mark .idlefonts aload pop end} bind def
  109.  /jobname () def
  110. %/jobtimeout
  111.  /manualfeed false def
  112.  /manualfeedtimeout 60 def
  113.  /margins {statusdict begin .topmargin .leftmargin end} bind def
  114.  /pagecount {4711} bind def
  115.  /pagestackorder {false} bind def
  116. %/pagetype
  117.  /prefeed false def
  118.  /printererror {pop pop} bind def
  119.  /printername {statusdict begin .printername exch copy end} bind def
  120.  /processcolors /processcolors load def        % defined in systemdict
  121.  /product product def        % product is defined in systemdict
  122.  /revision revision def        % revision is defined in systemdict
  123.  /sccbatch {pop 9600 0} bind def
  124.  /sccinteractive {pop 9600 0} bind def
  125.  /setdefaulttimeouts {statusdict begin .timeouts astore pop end} bind def
  126.  /setdostartpage {statusdict exch /dostartpage exch put} bind def
  127.  /setduplexmode {pop} bind def
  128.  /seteescratch {pop pop} bind def
  129.  /setidlefonts {] statusdict exch /.idlefonts exch put} bind def
  130.  /setjobtimeout {statusdict exch /jobtimeout exch put} bind def
  131.  /setmargins
  132.   {statusdict begin /.leftmargin exch def /.topmargin exch def end} bind def
  133.  /setpagetype
  134.   { statusdict begin
  135.       dup .pagetypenames exch get systemdict exch get exec
  136.       /pagetype exch def
  137.     end
  138.   } bind def
  139.  /setpassword
  140.   {exch checkpassword
  141.     {statusdict exch /.password exch put true}
  142.     {pop false}
  143.    ifelse} bind def
  144.  /setprintername
  145.   {dup length string copy statusdict exch /printername exch put} bind def
  146.  /setsccbatch {pop pop pop} bind def
  147.  /setsccinteractive {pop pop pop} bind def
  148.  /waittimeout 300 def
  149.  
  150. /.setpagesize
  151.  { mark /HWSize [
  152.      4 index 4 index matrix defaultmatrix dtransform
  153.      abs ceiling cvi exch abs ceiling cvi exch
  154.    ] currentdevice putdeviceprops pop pop pop
  155.    initmatrix initclip erasepage
  156.  } bind def
  157. /.password 0 def
  158. /.timeouts [0 60 30] def
  159. true setdostartpage
  160. mark setidlefonts
  161. 0 setjobtimeout
  162. 0 0 setmargins
  163. 0 setpagetype
  164. product setprintername
  165.  
  166. end    % statusdict
  167.  
  168. % The following contents of serverdict are a complete guess,
  169. % based on some observed LaserWriter boilerplate.
  170.  
  171. serverdict begin
  172.  
  173.  /execjob { } bind def
  174. % The Red Book implies that something like the following is
  175. % an appropriate definition of exitserver.
  176.  /exitserver { clear stop } bind def
  177. % However, this interacts badly with our standard error handler,
  178. % so we override it with the following less appropriate definition.
  179.  /exitserver { clear cleardictstack } bind def
  180.  /setrealdevice { } bind def
  181.  
  182. end    % serverdict
  183.